
<!DOCTYPE html PUBLIC "">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="X-UA-Compatible" content="edge" />

<title>用户注册</title>

<link rel="shortcut icon" href="http://www.boqii.com/favicon.ico" />

<link rel="stylesheet" type="text/css" href="/public/static/css/register/saved_resource"/>

<script src="/public/static/js/register/jquery.js"></script>

 

</head>

<body>

<div id="header">

    <!-- 公共头部开始 -->

    <!--公共头部开始-->



<link rel="stylesheet" type="text/css" href="/public/static/css/register/public_toolbar_baike.css"/>

<div id="toolbar">

    <div class="toolbar_auto">

        <ul class="toolbar_left left">

            <li ><a href="{:url('index/Index/index')}" var="101" ids="ID_101" target="_blank">波奇网</a></li>

            <li><a href="{:url('index/Index/index')}" var="102" ids="ID_102" target="_blank">波奇商城</a></li>        

            <li><a href="{:url('index/Index/index')}" var="104" ids="ID_104" target="_blank">波奇服务</a></li>

            <li><a href="{:url('index/Index/index')}" var="103" ids="ID_103" target="_blank">波奇论坛</a></li>

            <li ><a href="{:url('index/Index/index')}" var="105" ids="ID_105" target="_blank">宠物百科</a></li>

        </ul>

        <ul class="toolbar_right right"></ul>

    </div>

</div>

 


{block name="main"}
    <!-- 公共头部结束 -->

</div>
<!--登录开始-->
<div class="login_content">
    <div class="login_auto">
        <div class="login_top">

            <a href="{:url('index/Index/index')}"><img src="/public/static/image/login/logo.gif" width="190" height="88" alt="波奇网"></a>

            <h1>用户登录</h1>
        </div>
        <div class="login_body">

            <form id="login_form" name="form1" onsubmit="return false;" method="post" action="">

            
            <input type="hidden" id="seccode" name="seccode" value="1">
            <input name="referer" type="hidden" id="referer" value="&gt;">

            <div class="login_l left">

                <a href="{:url('index/User/register')}" target="_blank"><img src="/public/static/image/login/login.jpg" alt=""></a>

            </div>
            <div class="login_r right">
                <div class="login_list">
                    <em class="username"></em>
                    <input type="text" id="username" tabindex="1" name="username" rel="账号不能为空" placeholder="输入用户名/邮箱/手机号" class="login_username" style="color:#999;"  maxlength="11">
                </div>
                <div class="login_list">
                    <em class="password"></em>
                    <input type="password" tabindex="2" id="password" name="password" rel="密码不能为空">
                </div>

                <div class="forget_list" style="display:block">
                    <div class="yzm borderd">
                        <span class="forget_list_yzmtxt">验证码：</span>
                        <input type="text" id="m_verify" name="seccodeverify" class="w80" value="">
                        <div class="k_em">
                            <div class="tip err" id="m_verify_tip" style="display:none;"></div>
                        </div>
                    </div>
                    <span class="yzm">

                        <img src="{:captcha_src()}" id='imge' alt="captcha"  onclick="this.src='{:captcha_src()}?x='+Math.random();" />
                    </span>
                    <!-- <div class="change" id="update_temps1"><a href="">换一张</a></div> -->

                </div>

                <div id="login_tip" style="display:none;" class="login_tip mt10">您输入的帐户名和密码不匹配，请重新输入</div>
                <div class="login_text mt10">
                   
                    <div class="operate right"><a href="{:url('index/Forgot/forgota')}">忘记密码</a>　|　<a href="{:url('index/User/register')}">免费注册</a></div>
                </div>

                <div class="login_btn mt15"><a href="javascript:void(0);" id="a_login">登 录</a></div>

                <!-- <div class="login_btn mt15"><a href="javascript:void(0);" id="a_login" onclick='jas()'>登 录</a></div> -->
            

                <div class="other_body mt10">
                    <div class="other_text"><span>使用合作网站帐号登录</span></div>
                    <div class="other mt15"><a href="javascript:void(0)">支付宝</a>　|　<a href="javascript:void(0)">新浪微博</a>　|　<a href="javascript:void(0)" onclick="toQzoneLogin()">QQ</a>　|　<a href="javascript:void(0)">微信</a></div>
                </div>
            </div>
            </form>
        </div>
    </div>
</div>
<!--登录结束-->
<!-- 底部开始 -->
<div  class="login_content">

    <div class="footer_auto">

        <div class="footer_bot">

            <p class="link"><a target="_blank" href="javascript:void(0)">关于波奇</a><span>|</span><a target="_blank" href="javascript:void(0)">友情链接</a><span>|</span><a target="_blank" href="javascript:void(0)">诚聘英才</a><span>|</span><a target="_blank" href="javascript:void(0)">联系我们</a><span>|</span><a target="_blank" href="javascript:void(0)">网站地图</a><span>|</span><a target="_blank" href="javascript:void(0)">意见反馈</a><span>|</span><a target="_blank" href="javascript:void(0)">帮助中心</a><span>|</span>客服热线：400-820-6098</p>

            <p class="copy">Copyright © 2007-2017 Boqii.com All Rights Reserved 光橙（上海）信息科技有限公司 版权所有 <a href="http://www.miibeian.gov.cn/" target="_blank">沪ICP备13034501号-2</a>&nbsp;增值电信业务经营许可证：<a href="http://www.miibeian.gov.cn/" target="_blank">沪B2-20140120</a></p>

            <p>


                <a href='' target='_blank' rel='nofollow'><img src='/public/static/image/register/foot_gs.png' width="100" height="35"></a>

                <a href="" target="_blank" rel="nofollow"><img src="/public/static/image/register/foot_cx.png" width="100" height="35"></a>

                <a href="" target="_blank" rel="nofollow"><img src="/public/static/image/register/foot_kx.png" width="100" height="35"></a>

                <a href="" target="_blank" rel="nofollow"><img src="/public/static/image/register/foot_zx.png" width="100" height="35"></a>

            </p>

        </div>

    </div>

</div>

<!--底部结束-->
<div class="rightside">
    <a href="javascript:;" class="goTop" style="display: none;"></a>
</div>

<script>
    $('#username').blur(function() {
                $('#login_tip').attr('style', 'display:none');
                var username = $('#username').val();
                if (username == '' || username == '输入用户名/邮箱/手机号') {
                    $('#login_tip').text('请输入用户名或者邮箱或者手机号！');
                    $('#login_tip').attr('style', 'display:block');
                    return false;
                } else {
                    if ((/^1[3|4|5|7|8]\d{9}$/.test(username))) {
                        $('#mobileShow').show();
                        $('#isMobileYzm').val(1);
                    } else {
                        $('#mobileShow').hide();
                        $('#isMobileYzm').val(0);
                    }
                }
            });
    $('#password').blur(function() {
                $('#login_tip').attr('style', 'display:none');
                var password = $('#password').val();
                if (password == '') {
                    $('#login_tip').text('请输入密码！');
                    $('#login_tip').attr('style', 'display:block');
                    return false;
                }
            });
    $('#m_verify').blur(function() {
                check_m_verify();
            });
            function check_m_verify() {
                $('#m_verify_tip').attr('style', 'display:none');
                var m_verify = $('#m_verify').val();
                if (m_verify == '') {
                    $('#m_verify_tip').text('');
                    $('#m_verify_tip').attr('style', 'display:block');
                    $('#m_verify_tip').attr('class', 'tip err');
                    $('#login_tip').text('请输入验证码！');
                    $('#login_tip').attr('style', 'display:block');
                    return false;
                }
                // $.ajax(
            }

 
$('#a_login').click(function() {

                $('#login_tip').attr('style', 'display:none');
                var username = $('#username').val();
                if (username == '' || username == '输入用户名/邮箱/手机号') {
                    $('#login_tip').text('请输入用户名或者邮箱或者手机号！');
                    $('#login_tip').attr('style', 'display:block');
                    return false;
                }
                var password = $('#password').val();
                if (password == '') {
                    $('#login_tip').text('请输入密码！');
                    $('#login_tip').attr('style', 'display:block');
                    return false;
                }
                if ($('.forget_list').css('display') == 'block') {
                    $('#m_verify_tip').attr('style', 'display:none');
                    var m_verify = $('#m_verify').val();
                    if (m_verify == '') {
                        $('#m_verify_tip').text('');
                        $('#m_verify_tip').attr('style', 'display:block');
                        $('#m_verify_tip').attr('class', 'tip err');
                        $('#login_tip').text('请输入验证码！');
                        $('#login_tip').attr('style', 'display:block');
                        return false;
                    }
                }
                var remember = 0;
                if ($('#remember').attr('checked') == 'checked') {
                    remember = 1;
                }
                var info = $('#login_form input').serialize();
            // console.log(info);
            $.ajax({
                type:'post',

                url:"{:url('index/User/loginP')}",
                dataType:'json',
                data:info,
                success:function(data){
                    // console.log(data);
                    if(data == 'code'){
                        $('#login_tip').text('验证码不正确');
                        $('#imge').attr('src',"{:captcha_src()}?x='+Math.random();");
                        $('#login_tip').attr('style', 'display:block');
                        return false;
                    }
                    if(data == 'error'){
                         $('#login_tip').text('账号不存在');
                        $('#login_tip').attr('style', 'display:block');
                        return false;
                    }
                    if(data == 'stat'){
                         $('#login_tip').text('您的账户异常');
                        $('#login_tip').attr('style', 'display:block');
                        return false;
                    }
                    if(data == 'ok'){

                        window.location = "{:url('index/Index/index')}";

                        return false;
                    }else {
                        $('#login_tip').text('您的用户名或者密码不正确，请重新输入!');
                        $('#login_tip').attr('style', 'display:block');
                        return false;
                    }
                }

            })
});
    </script>
{/block}
</body>
</html>
